﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
namespace WebApi.Models
{
    public class ActivityinfoModel
    {
        public int hdid { get; set; }
        public int actionType { get; set; }
        public int shopid { get; set; }
        public string actionName = string.Empty;
        public string actionImgUrl = string.Empty;
        public string createTime = string.Empty;
        public string actionContent = string.Empty;
        public string actionAddress = string.Empty;
        public string startTime = string.Empty;
        public string endTime = string.Empty;
        public string ticketInformation = string.Empty;//购票须知

        public static ActivityinfoModel GetActivity (DataRow dr){
            ActivityinfoModel model = new ActivityinfoModel();
            model.hdid = Convert.ToInt32(dr["hdid"]);
            model.actionType = Convert.ToInt32(dr["actionType"]);
            model.shopid = Convert.ToInt32(dr["shopid"]);
            model.actionName = Convert.ToString(dr["actionName"]);
            model.actionImgUrl = Convert.ToString(dr["actionImgUrl"]);
            model.actionContent = Convert.ToString(dr["actionContent"]);
            model.actionAddress = Convert.ToString(dr["actionAddress"]);
            model.startTime = Convert.ToString(dr["startTime"]);
            model.endTime = Convert.ToString(dr["endTime"]);
            model.ticketInformation = Convert.ToString(dr["ticketInformation"]);
            return model;
        }
    }
}